<template>
  <div>
    <a class="linka" @click="toTicket()">{{ticketNumber}}</a>
  </div>
</template>

<script>
// import store from '@/store'
import { recordUserHyperlinks } from '../common'
export default {
  data () {
    return {}
  },
  computed:{
    ticketNumber(){
      return this.$data.data['Ticket  Number']
    }
  },
  methods: {
    toTicket () {
      if (this.$data.data.link) {
        const url = this.$data.data.link
        window.open(url, '_blank')
        let params = {
          type: 'autotask',
          url: url,
          action: 'click Through',
          data: this.$data.data.obj,
          ticketId: this.$data.data.obj.id
        }
        recordUserHyperlinks(this, params)
      }
    }
  }
}
</script>
<style scoped>
.linka{
  cursor: pointer;
  text-decoration: underline;
}
</style>
